<template>
    <fieldset>
        <legend>朋友</legend>
        <h1>徐颖</h1>
        <h1>蒋文</h1>
        <h1>朱付玉</h1>
    </fieldset>
</template>
<script>
export default{
    props:['id'],
    mounted(){
        console.log(this.$route.params)
        console.log(this.id)
    },
    watch:{
        //侦听路由参数的变化
        $route(newVal){
            console.log(newVal)
        },
        id(newVal){
            console.log('id--',newVal)
        }
    }
}
</script>